Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrections to cell-averaged density computation #213

Merged
merged 86 commits into from
May 7, 2022
Merged

Corrections to cell-averaged density computation #213

merged 86 commits into from
May 7, 2022

Conversation

iangrooms
Copy link

@iangrooms iangrooms commented Mar 29, 2022

This PR builds on mom-ocean#1156 and mom-ocean#1209, implementing a correction to the computation of cell-averaged density in various parts of the model. A description of the parameterization and results can be found in these papers.

The main updates in this PR are the ability to use a new stochastic version of the correction, and the ability to turn on the density correction in the calculation of the mixed layer lateral density gradient in the mixed layer restratification parameterization.
In addition, the code related to this parameterization has been re-factored a bit, along with some small bug fixes.

The parameterization can be toggled on/off in different parts of the code using the following flags:

  • USE_STANLEY_PGF turns it on in computation of the pressure gradient force
  • USE_STANLEY_ML turns it on in the mixed layer restratification parameterization
  • USE_STANLEY_ISO turns it on in the computation of isopycnal slopes in MOM_isopycnal_slopes.F90. This doesn't necessarily turn it on in MOM_thickness_diffuse.F90 though, since MOM_thickness_diffuse.F90 sometimes computes its own isopycnal slopes. See below
  • USE_STANLEY_GM turns it on in the computation of isopycnal slopes in GM. Specifically, it sets use_stanley to .TRUE. in these lines of MOM_thickness_diffuse.F90
    calc_derivatives = use_EOS .and. (k >= nk_linear) .and. &
    (find_work .or. .not. present_slope_x .or. CS%use_FGNV_streamfn .or. use_stanley)
    .

The tunable coefficients of the parameterization are controlled by

  • STANLEY_COEFF this is the main tunable coefficient, denoted c in the papers linked above. The SGS temperature variance is parameterized as c times squared temperature differences.
  • STANLEY_A allows you to tune the amplitude of the noise in the stochastic version. The multiplicative noise is exp(a * chi). With a default of 1.0 you get the stochastic parameterization described in the papers. With a value of 0.0 you get a deterministic parameterization.

pjpegion and others added 30 commits July 30, 2020 12:55
…an deterministic) Stanley SGS T variance parameterization.
…ern in MOM_PressureForce_FV,

when deterministic parameterization is on.
Add stochastic component to MOM_thickness_diffuse
fix array size declaration and post_data
…chastic) is switched on in PGF and thickness diffusion codes
jskenigson and others added 26 commits August 3, 2021 09:33
…leanup (#19)

* Test Stanley EOS param in mixed_layer_restrat

* Fix size of TS cov, S var in Stanley calculate_density calls

* Test move stanley scheme initialization

* Added missing openMP directives

* Revert Stanley tvar discretization (#18)

* Perform vertical filling in calculation of T variance

* Variable declaration syntax error, remove scaling from get_param

* Fix call to vert_fill_TS

* Code cleanup, whitespace cleanup

Co-authored-by: Jessica Kenigson <[email protected]>
Use Stanley (2020) variance; scheme off at coast
Change start indices in stanley_density_1d
Stanley param in MOM_isopycnal_slopes and thickness diffuse index fix
Pull in Jessica's isopycnal slope code
@gustavo-marques gustavo-marques self-requested a review May 5, 2022 22:37
@gustavo-marques
Copy link
Collaborator

Passing tests in mom_aux and Cheyenne-MOM6-examples.

MOM_input parameters added:

USE_STANLEY_ISO = False         !   [Boolean] default = False
                                ! If true, turn on Stanley SGS T variance parameterization in isopycnal slope
                                ! code.
USE_STANLEY_GM = False          !   [Boolean] default = False
                                ! If true, turn on Stanley SGS T variance parameterization in GM code.
STOCH_EOS = False               !   [Boolean] default = False
                                ! If true, stochastic perturbations are applied to the EOS in the PGF.
STANLEY_COEFF = -1.0            !   [not defined] default = -1.0
                                ! Coefficient correlating the temperature gradient and SGS T variance.
STANLEY_A = 1.0                 !   [not defined] default = 1.0
                                ! Coefficient a which scales chi in stochastic perturbation of the SGS T
                                ! variance.
USE_STANLEY_PGF = False         !   [Boolean] default = False
                               ! If true, turn on Stanley SGS T variance parameterization in PGF code.
USE_STANLEY_ML = False          !   [Boolean] default = False
                                ! If true, turn on Stanley SGS T variance parameterization in ML restrat code.

MOM_input parameters there were removed:

STANLEY_PRM_DET_COEFF = -1.0    !   [nondim] default = -1.0
                                ! The coefficient correlating SGS temperature variance with the mean temperature
                                ! gradient in the deterministic part of the Stanley parameterization. Negative
                                ! values disable the scheme.
PGF_STANLEY_T2_DET_COEFF = -1.0 !   [nondim] default = -1.0
                                ! The coefficient correlating SGS temperature variance with the mean temperature
                                ! gradient in the deterministic part of the Stanley form of the Brankart
                                ! correction. Negative values disable the scheme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants